/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class AirQualityMonitor {
    static categoryCode = '010030020';

    static categoryName = '空气质量检测仪';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return AirQualityMonitor.categoryCode;
    }

    get categoryName() {
        return AirQualityMonitor.categoryName;
    }

    getAirQualityIndex(params) {
        return command({
            method: 'getAirQualityIndex',
            methodId: 'ppAXISSd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCh2oValue(params) {
        return command({
            method: 'getCh2oValue',
            methodId: 'peH3nfqr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCo2Value(params) {
        return command({
            method: 'getCo2Value',
            methodId: 'pGoxHGIS',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHumidityValue(params) {
        return command({
            method: 'getHumidityValue',
            methodId: 'pUPQ8VCZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPm10Value(params) {
        return command({
            method: 'getPm10Value',
            methodId: 'pDrhFbj3',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPm1Value(params) {
        return command({
            method: 'getPm1Value',
            methodId: 'p1vFjxTV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPm2_5Value(params) {
        return command({
            method: 'getPm2_5Value',
            methodId: 'pgh0mcaG',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTempCurrent(params) {
        return command({
            method: 'getTempCurrent',
            methodId: 'pZgRT3lL',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getVocValue(params) {
        return command({
            method: 'getVocValue',
            methodId: 'phEqKY6x',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default AirQualityMonitor;
